Repository navigation
Run seven lint gates through their root check:* alias instead of a copied command - #26409
Conversation
Each of these steps spelled out the same command its root package.json alias holds, so the two copies could drift. The steps now run the alias, and the system-context census self-test pins the alias instead of the inline lines. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmQq9EYQdTQwmRutQTS
席位核对 · ACCEPT · devx seat 2 · 2026-10-27T02:48ZSeat
For the cards' next round: #26091 Wanted 2 says CI calls |
Requested by Steve · project thread
Part of #26086
Part of #26091
Clause-②: no
Metadata-protocol: none
维护者速读
lint.yml里 7 个门禁步骤原来把根package.json别名的命令逐字抄了一遍,现在直接跑pnpm check:NAME。另外check-system-context-census的自测原来钉的是内联两行,现在改钉别名。package.json就是唯一定义。卡上说 16 处,实测只有 9 处逐字相同;另外 2 处所在的 job 有意不装 pnpm,所以不动。其余调用的参数和别名本来就不一样,CI 实跑的是内联那份,逐条写在 Acceptance notes。pnpm check:*步骤;pnpm 会原样透传退出码(本地测过 exit 3)。回滚就是 revert 这个 PR。.github/workflows/lint.yml的 7 处 hunk,以及scripts/check-system-context-census.mjs的 WIRING 小节。pnpm check:NAME,7 个都是 exit 0;再跑node scripts/check-system-context-census.mjs --self-test。.github/workflows/**),需要 GOVERNED_APPROVERS(os-zhuang 或 hotlong)批准。两张卡这里都只写 Part of:ci: 20 inline workflow scripts over 80 lines (4,385 lines, largest 872) cannot be self-tested, and 16 check:* gates are run by copying their command line into the YAML instead of pnpm run, so they drift from package.json #26086 的其余 17 段主体还在等 Steve 的决策卡;tooling: root scripts/ is about 462k lines, 20 scripts are referenced from nowhere, 22 root check:* aliases are called by no workflow, hook or script, the same gate is spelled two ways, and 5 check-* scripts have no --self-test #26091 还剩 4 个别名没有调用方,外加一个--self-test,见下文。What changes
Seven
lint.ymlgate steps spelled out, byte for byte, the command their rootpackage.jsonalias holds. They now run the alias:lint-repo-toolingnode scripts/check-system-context-census.mjs --self-testthennode scripts/check-system-context-census.mjspnpm check:system-context-censuslint-repo-toolingcheck-undeclared-dep-imports.mjslegspnpm check:undeclared-dep-importslint-repo-toolingcheck-keyed-text-bounds.mjslegspnpm check:keyed-text-boundslint-repo-toolingcheck-platform-object-tenancy-census.mjslegspnpm check:platform-object-tenancy-censuslint-ci-enginenode … --self-test && node …pnpm check:registry-log-declaredlint-ci-enginenode … --self-test && node …pnpm check:rest-log-declaredlint-ci-enginenode … --self-test && node …pnpm check:rest-log-spy-declared&&. The census below compares them as parsed strings, not by eye. A two-linerun: |block under the defaultbash -ealready stopped at the first failing leg, so&&changes nothing.pnpmpasses the child's exit code through (checked locally with a script that exits 3). Each step keeps itsid:andcontinue-on-error: true, so the lane verdict reads it as before.Setup pnpmandInstall dependenciesbefore their gates, and they already run 42 (lint-repo-tooling) and 36 (lint-ci-engine)pnpm check:*steps.check-system-context-census.mjs --self-testasserted thatlint.ymlcontains the two literalnode scripts/check-system-context-census.mjslines. It now asserts thatlint.ymlrunspnpm check:system-context-census, and that the root alias is exactlynode scripts/check-system-context-census.mjs --self-test && node scripts/check-system-context-census.mjs. The guarantee is the same: both legs are scheduled, and the step's battery has one more check. Negative control: with thelint.ymlline removed, the self-test fails onWIRING: lint.yml invokes this gate through its root alias. Its docblock's two sentences about the pin now say "through the alias".noderather than through apnpm check:*alias" pointers above the census and undeclared-dep-imports steps. No other workflow prose changes. TheGATE INVOCATION IDIOMnote at the top oflint.ymlstill holds: it says the direct form is a choice, not a fence, and most steps still take it.Tests
pnpm -s check:NAME): seven exit 0.node scripts/check-system-context-census.mjs --self-test: all cases pass. The negative control above turns it red with one FAIL line.node scripts/…lines exactly equal a rootcheck:*alias: 9 before, 2 after. The 2 left are the no-pnpm jobs below.grep -c 'pnpm run check:\|pnpm check:' .github/workflows/*.yml, summed: 216 onmain, 223 here (+7).Derived gate families:
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgives 56 commands. All 56 exit 0, and--ran ran.listgives56 derived famil(ies) accounted for — 56 run, 0 NOT-MEASURED. CI runs the rest.Gate results (exit code, command, seconds)
Acceptance notes
#26086 counted 16 inlined commands. 9 steps match an alias exactly. The census reads every
run:step and finds its non-comment lines that invoke ascripts/file that some rootcheck:*alias also invokes. It then compares those lines, joined with&&, against the alias value. It finds 9 exact matches and 46 partial ones. The partial ones are mostly different invocations of the same script, not copies of the alias, so CI is enforcing the inline form. This is the "which one CI actually enforced" answer the card asks for:check-links.yml· Check ADR cross-linkscheck:adr-linksnodeboard-snapshot.yml· The tool's own casescheck:pm-board-snapshotpnpm installand sets up no pnpm (its own comment)nodepr-automation.ymlchangeset-check (3 steps)check:empty-changeset,check:adr-0087-registration,check:changeset-gate-self-tests--base "$MERGE_BASE"; the aliases run it against the default baselint.ymlsymbol-anchor collector + 3 scan stepscheck:adr-symbol-anchors,check:scripts-symbol-anchors,check:spec-docblock-symbol-anchorsrun_self_testcollector, the scans as separate stepslint.yml· dev-prereqs, skill-frame freshnesscheck:dev-prereqs,check:skill-frame-freshnesshalf-state-patrol.yml· Sweep the closed cardscheck:pm-closed-card-sweepci.yml(stall guard, shard attestation)check:stall-guard,check:shard-attestation--log/--emit/--verifymodes; the aliases are their self-testscut-rc.yml(3 gates, release bodies)check:release-body--base "$SNAPSHOT_SHA"formscheck:closing-target-claim,check:partof-closing-keyword,check:docs-audit-scope,check:pm-fleet-write-*,check:issue-citationsSo the drift the card describes, two copies of one command, existed in 9 places. 7 are removed here. The other 2 are in jobs built to run without pnpm.
#26091 Wanted 2 is partly done here. Root
check:*aliases with no caller in any workflow, hook,scripts/file or otherpackage.jsonscript: 11 onmain, 4 after this PR. The 4 arecheck:adr-symbol-anchors,check:scripts-symbol-anchors,check:spec-docblock-symbol-anchorsandcheck:pm-closed-card-sweep, and the row above says why each step is split. Calling the alias there would rerun the self-tests that the collector already runs. Deleting the alias would remove the local one-command form. Its claim rules out both ("no gate removed or added"), so they are reported, not changed. The card's other leftover, a--self-testforscripts/check-changeset-fixed.mjs, is not in this claim. Both are why this PR isPart of #26091.Verification
Tier H (
.github/workflows/**): draft until a GOVERNED_APPROVERS approval (os-zhuang, hotlong).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQq9EYQdTQwmRutQTS